-- GENERATED SPELL FOR [Gorishi Hive Guard] --


function spell0_10040(pUnit, Event) --@Silithid Pox,n/a--
pUnit:FullCastSpellOnTarget(8137,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10040', 2000, 1)
end

function spell1_10040(pUnit, Event) --@Tunneler Acid,n/a--
pUnit:FullCastSpellOnTarget(14120,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10040', 30344, 1)
end

function Sorts_10040(pUnit, Event)
local choix_sorts_10040 = math.random(0, 1)
if choix_sorts_10040 == 0 then
pUnit:RegisterEvent('spell0_10040', 1, 1)
end
if choix_sorts_10040 == 1 then
pUnit:RegisterEvent('spell1_10040', 1, 1)
end
end

function mob10040_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10040', math.random(1500, 3000), 1)
end

function mob10040_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10040_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10040_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10040, 1, 'mob10040_Action')
RegisterUnitEvent(10040, 2, 'mob10040_Leave')
RegisterUnitEvent(10040, 3, 'mob10040_Kill')
RegisterUnitEvent(10040, 4, 'mob10040_Die')
